<template>
  <div class="container">
    <div>
      <el-row :gutter="25">
        <el-col :span="6">
          <el-form ref="form" :model="form" label-width="120px">
            <el-form-item label="工地名称：">
              <el-input
                v-model="select.name"
                placeholder="请输入工地名称"
                style="width: 150px"
              ></el-input>
            </el-form-item>
          </el-form>
        </el-col>
        <el-col :span="14">
          <el-form ref="form" :model="form" style="float: left">
            <el-form-item>
              <el-button size="mini" type="primary" @click="screeningData"
                >查 询</el-button
              >
              <el-button size="mini" type="success" @click="handleAdd"
                >新 增</el-button
              >

              <el-button style="padding: 0; border: 0">
                <el-upload
                  action="/上传文件的接口"
                  :on-change="onChange"
                  :auto-upload="false"
                  :show-file-list="false"
                  accept=".xls, .xlsx"
                  class="upload"
                >
                  <el-button size="mini" type="success">导 入</el-button>
                </el-upload>
              </el-button>
              <el-button size="mini" type="warning" @click="exportExcel"
                >导 出</el-button
              >
            </el-form-item>
          </el-form>
        </el-col>
      </el-row>
    </div>
    <el-table
      border
      highlight-current-row
      :data="
        tableData.slice((currentPage - 1) * pageSize, currentPage * pageSize)
      "
      @row-dblclick="dblClickRow"
    >
      <!-- <el-table-column  prop="ID" label="站点编号" align="center" ></el-table-column> -->
      <el-table-column
        prop="POINTNAME"
        label="工地名称"
        align="center"
      ></el-table-column>
      <el-table-column prop="MJ" label="面积" align="center"></el-table-column>
      <el-table-column
        prop="NUM"
        label="日产生渣土量"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="TYPE"
        label="出土类型"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="TOWNNAME"
        label="详细地址"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="NAME"
        label="建设单位名称"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="CLIENT_NAME"
        label="所属区域"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="FZR"
        label="负责人"
        align="center"
      ></el-table-column>
      <el-table-column
        prop="DH"
        label="负责人电话"
        align="center"
      ></el-table-column>
      <el-table-column label="操作" align="center">
        <template slot-scope="scope">
          <!-- <el-button type="text" @click="handleEdit(scope.$index, scope.row)"
            >定位</el-button
          > -->
          <el-button type="text" @click="handleEdit(scope.$index, scope.row)"
            >编辑</el-button
          >
          <el-button
            type="text"
            @click="handleDelete(scope.$index, scope.row)"
            style="color: red"
            >删除</el-button
          >
        </template>
      </el-table-column>
    </el-table>
    <div class="pagination">
      <el-pagination
        background
        layout="total, sizes, prev, pager, next, jumper"
        :current-page="currentPage"
        :page-size="pageSize"
        :total="tableData.length"
        @size-change="handleSizeChange"
        @current-change="handlePageChange"
      ></el-pagination>
    </div>

    <!-- 弹出框 -->
    <el-dialog
      :title="addDialogTitle"
      :visible.sync="isVisibleEdit"
      width="50%"
      :modal="false"
    >
      <el-form ref="form" :model="form" label-width="150px" class="flex">
        <el-form-item label="工地名称：" class="wid50">
          <el-input
            v-model="form.POINTNAME"
            placeholder="请输入工地名称"
            class="handle-input mr10"
          ></el-input>
        </el-form-item>
        <el-form-item label="面积：" class="wid50">
          <el-input
            v-model="form.MJ"
            placeholder="请输入面积"
            class="handle-input mr10"
          ></el-input>
        </el-form-item>
        <el-form-item label="日产生渣土量：" class="wid50">
          <el-input
            v-model="form.NUM"
            placeholder="请输入日产生渣土量"
            class="handle-input mr10"
          ></el-input>
        </el-form-item>
        <el-form-item label="出土类型：" class="wid50">
          <el-input
            v-model="form.TYPE"
            placeholder="请输入出土类型"
            class="handle-input mr10"
          ></el-input>
        </el-form-item>
        <el-form-item label="详细地址：" class="wid50">
          <el-input
            v-model="form.TOWNNAME"
            placeholder="请输入详细地址"
            class="handle-input mr10"
          ></el-input>
        </el-form-item>
        <el-form-item label="建设单位名称：" class="wid50">
          <el-input
            v-model="form.NAME"
            placeholder="请输入建设单位名称"
            class="handle-input mr10"
          ></el-input>
        </el-form-item>
        <el-form-item label="组织机构：" class="wid50">
          <el-select
            v-model="form.CLIENT_NO"
            value-key="id"
            placeholder="请选择"
          >
            <el-option
              v-for="item in selectClientInfoList"
              :key="item.CLIENT_NO"
              :label="item.CLIENT_NAME"
              date-name="item.CLIENT_NAME"
              :value="item.CLIENT_NO"
            >
            </el-option>
          </el-select>
        </el-form-item>
        <el-form-item label="负责人：" class="wid50">
          <el-input
            v-model="form.FZR"
            placeholder="请输入负责人"
            class="handle-input mr10"
          ></el-input>
        </el-form-item>
        <el-form-item label="负责人电话：" class="wid50">
          <el-input
            v-model="form.DH"
            placeholder="请输入负责人电话"
            class="handle-input mr10"
          ></el-input>
        </el-form-item>
      </el-form>

      <span slot="footer" class="dialog-footer">
        <el-button @click="isVisibleEdit = false">取 消</el-button>
        <el-button type="primary" @click="handleSubmit()">确 定</el-button>
      </span>
    </el-dialog>
  </div>
</template>
<script>
import '@/assets/css/common.css'

import export2Excel from '@/utils/exportExcel/index.js'
import OSS from 'ali-oss';
import { time } from 'echarts';
import eventBus from '@/eventBus.js'


export default {
  data () {

    return {
      clientData: [],
      currentPage: 1, //初始页
      pageSize: 10,    //    每页的数据
      originalData: [],
      tableData: [],
      selectClientInfoList: [],
      expireData: [],
      select: {
        name: ''
      },
      isVisibleEdit: false,
      showBigDialogDate: true,
      TYPElevel: [
        { TYPEltitle: '其他垃圾工地' },
        { TYPEltitle: '厨余垃圾工地' },
        { TYPEltitle: '可回收垃圾工地' },
        { TYPEltitle: '有害垃圾工地' }
      ],
      rolelevel: [{
        roleleveltitle: '公司',
        rolelevelindex: '-1'
      }, {
        roleleveltitle: '项目',
        rolelevelindex: '0'
      }, {
        roleleveltitle: '机扫',
        rolelevelindex: '1'
      }, {
        roleleveltitle: '垃圾',
        rolelevelindex: '2'
      }, {
        roleleveltitle: '人工',
        rolelevelindex: '3'
      }, {
        roleleveltitle: '公厕维保',
        rolelevelindex: '4'
      }],
      form: {
        DW: "",
        CPH: "",
        MODEL: "",
        PERSON: "",
        BUYTIME: "",
        EXPLAIN: "",
        USEDEPTNAME: "",
        USEDEPTID: "",
        VOWNER: "",
        BRAND: "",
        VIN: "",
        ENGINENUM: "",
        DISCHARGERATE: "",
        VCONDITION: "",
        PRICE: "",
        CLIENT_NO: [],
        USE: "",
      },
      showBigDialogVisible: false,
      srcBig: '',
      //图片上传
      fileList: [],
      FZRUrl: '', //存上传后的工地图片url
      CBPicUrl: '', //存上传后的车本图片url
      dataObj: {
        region: 'oss-cn-beijing',//我的存储是北京，可根据具体配置自行修改
        accessKeyId: 'LTAISI12uxTRFccz',
        accessKeySecret: 'cQAvLIZ9JizT5RXRNPBVcXfg3iURD8',
        bucket: 'photo-srw-hb2',
      }, //存签名信息
      baseAli: 'oss-cn-beijing.aliyuncs.com',
    }
  },
  created () {
    if (localStorage.getItem('CTYPE') == '0') {
      this.rolelevel.shift()
    } else if (localStorage.getItem('CTYPE') != '-1') {
      this.rolelevel = []
    }
    this.getClientRoleList()
  },
  mounted () {
    this.getlistdata()
    // this.screeningData()
  },
  methods: {

    //获取工地列表
    async getlistdata () {
      // var url = '/CarService/getPlaceGarbagePoint?CLIENT_NO=' + localStorage.getItem('CLIENT_NO')
      // const { data } = await this.$Http.get(url)
      this.originalData =
        [
          {
            "ID": "9",
            "NAME": "天津铁建",
            "POINTNAME": "金茂产业园地铁工地",
            "TOWNNAME": "东丽区金茂产业园",
            "NUM": "200",
            "MJ": "16000",
            "TYPE": "渣土",
            "LONGITUDE": 117.28127896,
            "LATITUDE": 39.140629,
            "CLIENT_NO": "0000001",
            "CLIENT_NAME": "东丽东片区",
            "FZR": "侯孟才",
            "DH": "17622783200"
          },
          {
            "ID": "7",
            "NAME": "云南建业集团天津分公司",
            "POINTNAME": "万山道地铁工地",
            "TOWNNAME": "东丽区万山道",
            "NUM": "200",
            "MJ": "13000",
            "TYPE": "渣土",
            "LONGITUDE": 117.28131901,
            "LATITUDE": 39.12369921,
            "CLIENT_NO": "0000001",
            "CLIENT_NAME": "东丽东片区",
            "FZR": "魏守明",
            "DH": "15822709835"
          },
          {
            "ID": "8",
            "NAME": "天津铁建",
            "POINTNAME": "沙柳南路地铁工地",
            "TOWNNAME": "东丽区沙柳南路",
            "NUM": "350",
            "MJ": "13000",
            "TYPE": "渣土",
            "LONGITUDE": 117.28275473,
            "LATITUDE": 39.11511249,
            "CLIENT_NO": "0000001",
            "CLIENT_NAME": "东丽东片区",
            "FZR": "储信有",
            "DH": "13920835835"
          },
          {
            "ID": "1",
            "NAME": "云南建业集团天津分公司",
            "POINTNAME": "蓟汕高速收费站西侧工地",
            "TOWNNAME": "东丽区蓟汕高速收费站西侧",
            "NUM": "150",
            "MJ": "25000",
            "TYPE": "渣土",
            "LONGITUDE": 117.38984680,
            "LATITUDE": 39.07931678,
            "CLIENT_NO": "0000001",
            "CLIENT_NAME": "东丽东片区",
            "FZR": "孙克文",
            "DH": "18526080198"
          },
          {
            "ID": "2",
            "NAME": "天津一建",
            "POINTNAME": "华泰农业示范园区工地",
            "TOWNNAME": "东丽区华泰农业示范园区",
            "NUM": "200",
            "MJ": "37000",
            "TYPE": "渣土",
            "LONGITUDE": 117.43007192,
            "LATITUDE": 39.07898391,
            "CLIENT_NO": "0000001",
            "CLIENT_NAME": "东丽东片区",
            "FZR": "刘希文",
            "DH": "15522140963"
          },
          {
            "ID": "3",
            "NAME": "天津二建",
            "POINTNAME": "汇雪南道道路建设工地",
            "TOWNNAME": "东丽区汇雪南道",
            "NUM": "100",
            "MJ": "19000",
            "TYPE": "渣土",
            "LONGITUDE": 117.45112104,
            "LATITUDE": 39.15987904,
            "CLIENT_NO": "0000001",
            "CLIENT_NAME": "东丽东片区",
            "FZR": "杨立江",
            "DH": "18920666995"
          },
          {
            "ID": "6",
            "NAME": "天津铁建",
            "POINTNAME": "香山道地铁工地",
            "TOWNNAME": "东丽区香山道",
            "NUM": "600",
            "MJ": "14000",
            "TYPE": "渣土",
            "LONGITUDE": 117.28012970,
            "LATITUDE": 39.13058367,
            "CLIENT_NO": "0000001",
            "CLIENT_NAME": "东丽东片区",
            "FZR": "黄士利",
            "DH": "15122097206"
          }]
      this.screeningData()
    },
    // 获取组织机构名
    async getClientRoleList () {
      var url = '/CarService/getAbleAddPlaceInfo?CLIENT_NO=' + localStorage.getItem('CLIENT_NO')
      const { data } = await this.$Http.get(url)
      this.selectClientInfoList = data
    },
    // 给组织机构名称下拉列表传值
    changClient (e) {
      this.form.CLIENT_NO_select = ''
      this.getClientRoleList(e)
    },
    change (e) {
      this.$forceUpdate()
    },
    // 导入Excel
    onChange (file, fileList) {
      //  console.log(fileList);
      this.fileData = file; // 保存当前选择文件
      this.readExcel(); // 调用读取数据的方法
    },
    // 读取数据
    readExcel (e) {
      let that = this;
      const files = that.fileData;
      console.log(files);
      if (!files) {
        //如果没有文件
        return false;
      } else if (!/\.(xls|xlsx)$/.test(files.name.toLowerCase())) {
        this.$message.error("上传格式不正确，请上传xls或者xlsx格式");
        return false;
      }
      const fileReader = new FileReader();
      console.log(fileReader)
      fileReader.onload = ev => {
        try {
          const data = ev.target.result;
          //  console.log(ev.target)
          //  console.log(this);
          const workbook = this.XLSX.read(data, {
            type: "binary"// 以字符编码的方式解析
          });

          if (workbook.SheetNames.length >= 1) {
            //  this.$message({
            //    message: "导入数据表格成功",
            //    showClose: true,
            //    type: "success"
            //  });

            const wsname = workbook.SheetNames[0]; //取第一张表
            const ws = this.XLSX.utils.sheet_to_json(workbook.Sheets[wsname]); //生成json表格内容
            console.log(ws)
            this.inputExcelDataLength = ws.length
            this.fullscreenLoading = this.$loading({
              lock: true,
              text: 'Loading',
              spinner: 'el-icon-loading',
              background: 'rgba(0, 0, 0, 0.7)'
            })
            for (let i = 0, len = ws.length; i < len; i++) {
              var item = ws[i]
              //   var sheetData = {
              //     VID: item['居民电话'],
              //     RUBBISH_NAME: item["垃圾品名"],
              //     WEIGHT: item["垃圾称重"],
              //     photo: '',
              //     LONGITUDE: 0,
              //     LATITUDE: 0
              //   }
              //   let exceldata =  []
              //   exceldata.push(sheetData)
              this.addWeight(item)
            }
          } else {
            this.$message.error("未读取到表格内容");
          }
        } catch (e) {
          return false;
        }
      };
      // 如果为原生 input 则应是 files[0]
      fileReader.readAsBinaryString(files.raw);
    },
    async addWeight (item) {
      this.$axios({
        url: 'CarService/AddPlaceGarbagePoint',
        method: 'post',
        data: {
          POINTNAME: item['工地名称'],
          TOWNNAME: item['点位名称'],
          LONGITUDE: item['经度'],
          LATITUDE: item['纬度'],
          CLIENT_NO: item['区域ID'],
          FZR: item['作业车辆'],
        }
      }).then(res => {
        console.log(res)
        this.inputExcelDataIndex++
        if (res.data.IsSucess) {
          this.fullscreenLoading.close()
          this.$message.success('表格文件导入成功')
          this.getlistdata()
        } else {
          this.fullscreenLoading.close()
          this.$message.error('表格文件导入失败' + '，' + res.data.Message);

        }
        if (this.inputExcelDataIndex == this.inputExcelDataLength) {
          this.fullscreenLoading.close()
          if (this.strError.length == 0) {
            this.$message.success('表格文件导入成功')
          } else {
            // this.$message.error('表格文件导入结束<br/>' + this.strError);
            this.$message({
              message: '表格文件导入结束，' + this.strError,
              type: 'error',
              duration: 5000
            })
          }
          this.getlistdata()
        }
      })
      //   })
    },
    // 导出Excel
    exportExcel () {
      let excelName = '工地信息'
      const tHeader = ['工地名称', '面积', '日产生渣土量', '出土类型', '详细地址', '建设单位名称', '所属区域', '负责人', '负责人电话']
      const filterVal = ['POINTNAME', 'MJ', 'NUM', 'TYPE', 'TOWNNAME', 'NAME', 'CLIENT_NAME', 'FZR', 'DH']
      export2Excel(tHeader, filterVal, this.tableData, excelName)
    },
    // 打开新增窗口
    handleAdd () {
      this.addDialogTitle = '新增工地信息'
      //清空编辑框
      this.form = {}
      //展示窗口
      this.isVisibleEdit = true;
      // this.idEdit = false;
    },
    // 打开编辑窗口
    handleEdit (index, row) {
      this.form = Object.assign({}, row);
      this.form.CLIENT_NO_select = this.form.USERNAME
      this.addDialogTitle = '编辑工地信息'
      this.isVisibleEdit = true;
    },
    // 点击保存，判断是新增还是编辑操作
    handleSubmit () {
      if (this.addDialogTitle == '新增工地信息') {

        this.$message.success('新增成功');
        this.isVisibleEdit = false
      } else {

        this.$message.success('编辑成功');
        this.isVisibleEdit = false
      }
    },
    // 新增保存
    async saveAdd1 () {
      // console.log(this.addform)
      this.$axios({
        url: '/CarService/AddPlaceGarbagePoint',
        method: 'post',
        data: {
          POINTNAME: this.form.POINTNAME,
          TOWNNAME: this.form.TOWNNAME,
          LONGITUDE: this.form.LONGITUDE,
          LATITUDE: this.form.LATITUDE,
          CLIENT_NO: this.form.CLIENT_NO,
          FZR: this.form.FZR,
        },

      }).then((res) => {
        console.log(this.data)
        console.log(res)
        if (res.data.IsSucess) {
          this.$message.success('新增成功');
          this.isVisibleEdit = false
          this.getlistdata()
        } else {
          this.$message.error('新增失败');
        }
      })

    },
    // 保存编辑
    async saveEdit1 () {
      this.$axios({
        url: 'CarService/UpdataPlaceGarbagePoint',
        method: 'post',
        data: {
          //  ID: this.form.ID,
          POINTNAME: this.form.POINTNAME,
          TOWNNAME: this.form.TOWNNAME,
          LONGITUDE: this.form.LONGITUDE,
          LATITUDE: this.form.LATITUDE,
          CLIENT_NO: this.form.CLIENT_NO,
          FZR: this.form.FZR,
        },

      }).then((res) => {
        console.log(this.data)
        console.log(res)
        if (res.data.IsSucess) {
          this.$message.success('编辑成功');
          this.isVisibleEdit = false
          this.getlistdata()
        } else {
          this.$message.error('编辑失败');
        }
      })
    },
    // 删除工地信息
    async handleDelete (index, row) {
      this.$message.success('删除成功')
      this.isVisibleEdit = false
      this.getlistdata()

    },
    async handleDelete1 (index, row) {
      const confirmResult = await this.$confirm('确定删除？', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).catch(err => err)
      if (confirmResult == 'confirm') {
        const params = {
          ID: row.POINTNAME,
        }
        const { data } = await this.$Http.get('CarService/DeletePlaceGarbagePoint', { params })
        if (data.IsSucess) {
          this.$message.success('删除成功')
          this.isVisibleEdit = false
          this.getlistdata()
        } else {
          this.$message.error('删除失败');
        }
      } else {
        this.$message.info('取消删除')
        this.isVisibleEdit = false
      }

    },
    // 模糊查询
    screeningData () {
      this.currentPage = 1;
      this.tableData = []
      // this.tableData = this.originalData
      // if (this.select.name) this.tableData = this.tableData.filter(item => item.POINTNAME.includes(this.select.name))
      // console.log(this.select.name)
      // var listDuli = [], listFujian = [], listYidong = [];
      this.originalData.forEach(item => {
        if (!item.POINTNAME.includes(this.select.name)) {
          return;
        }
        // switch (item.TYPE) {
        //     case '独立式公厕':
        //       item.img = 'duli'
        //       listDuli.push(item);
        //       break;
        //     case '附建式公厕':
        //       item.img = 'fujian'
        //       listFujian.push(item);
        //       break;
        //     case '移动式公厕':
        //       item.img = 'yidong'
        //       listYidong.push(item);
        //       break;
        //   }
        item.img = '工地'
        this.tableData.push(item);
      });
      eventBus.$emit('mapData_Point', [this.tableData])
      // eventBus.$emit('mapData_Point', this.tableData)
    },
    // 分页导航
    handlePageChange (currentPage) {
      this.currentPage = currentPage;
      // console.log(this.currentPage)
      // this.$set(this.query, 'pageIndex', val);
      // this.getlistdata();
    },
    handleSizeChange (size) {
      this.pageSize = size;
      console.log(this.pageSize)
    },
    // 放大图片
    bigImage (row) {
      this.srcBig = row.FZRPicPath
      this.showBigDialogVisible = true
    },
    handleClose () {
      this.showBigDialogVisible = false;
    },
    // 限制用户上传的图片格式和大小
    beforeAvatarUpload (file) {
      const isJPG = file.type === 'image/jpeg';
      const isLt2M = file.size / 1024 / 1024 < 2
      if (!isJPG) {
        this.$message.error('上传头像图片只能是 JPG 格式!');
      }
      if (!isLt2M) {
        this.$message.error('上传头像图片大小不能超过 2MB!');
      }
      return isJPG && isLt2M;
    },
    // 点击上传工地图片按钮
    clickFZR () {
      this.$refs.FZRFile.click();

    },
    changeFZR () {
      this.afterRead1(this.$refs.FZRFile.files[0]);
      this.$refs.FZRFile.value = null; // 移除文件，可以保证上传同样的文件时，也会触发change事件
    },
    // 上传工地图片
    afterRead1 (file) {
      return new Promise((resolve, reject) => {
        // 此时可以自行将文件上传至服务器
        const that = this
        let client = new OSS(this.dataObj)
        const fileName = file.name
        //定义唯一的文件名，打印出来的uid其实就是时间戳
        //client 是第一步中的 client
        client
          .multipartUpload(fileName, file)
          .then((result) => {
            //下面是如果对返回结果再进行处理，根据项目需要
            // console.log(result)
            that.FZRUrl =
              'http://' +
              result.bucket +
              '.' +
              that.baseAli +
              '/' +
              result.name
            console.log(that.FZRUrl)
            resolve()
          })
          .catch((err) => {
            console.log('err:', err)
            reject()
          })
      })
    },

    // 点击上传车本图片按钮
    clickCBPic () {
      this.$refs.CBPicFile.click();

    },
    changeCBPic () {
      this.afterRead2(this.$refs.CBPicFile.files[0]);
      this.$refs.CBPicFile.value = null; // 移除文件，可以保证上传同样的文件时，也会触发change事件
    },
    // 上传车本图片
    afterRead2 (file) {
      return new Promise((resolve, reject) => {
        // 此时可以自行将文件上传至服务器
        const that = this
        let client = new OSS(this.dataObj)
        const fileName = file.name
        //定义唯一的文件名，打印出来的uid其实就是时间戳
        //client 是第一步中的 client
        client
          .multipartUpload(fileName, file)
          .then((result) => {
            //下面是如果对返回结果再进行处理，根据项目需要
            // console.log(result)
            that.CBPicUrl =
              'http://' +
              result.bucket +
              '.' +
              that.baseAli +
              '/' +
              result.name
            console.log(that.CBPicUrl)
            resolve()
          })
          .catch((err) => {
            console.log('err:', err)
            reject()
          })
      })
    },
    afterRead (file) {
      return new Promise((resolve, reject) => {
        // 此时可以自行将文件上传至服务器
        const that = this
        let client = new OSS(this.dataObj)
        const fileName = file.name
        //定义唯一的文件名，打印出来的uid其实就是时间戳
        //client 是第一步中的 client
        client
          .multipartUpload(fileName, file)
          .then((result) => {
            //下面是如果对返回结果再进行处理，根据项目需要
            // console.log(result)
            that.tempUrl =
              'http://' +
              result.bucket +
              '.' +
              that.baseAli +
              '/' +
              result.name
            console.log(that.tempUrl)
            resolve()
          })
          .catch((err) => {
            console.log('err:', err)
            reject()
          })
      })
    },
    handleAvatarSuccess (res, file) {
      this.imageUrl = URL.createObjectURL(file.raw)
    },
    // 双击表格某一行
    dblClickRow (row) {
      eventBus.$emit('mapDBrowPoint', row)
    },
  }
}
</script>
<style>
.container {
  overflow-y: auto;
  height: calc(100% - 50px);
  border: 0px;
}
.el-col-6 {
  min-width: 400px;
  min-height: 50px;
}
.el-table th {
  height: 40px;
}
.el-form-item label {
  width: 80px;
}
/* .el-upload--text {
  width: 300px;
} */
</style>